Adding vulnerability Assessemtn clinet code#4327
Adding vulnerability Assessemtn clinet code#4327dsgouda merged 7 commits intoAzure:psSdkJson6from yaakoviyun:psSdkJson6
Conversation
|
@jaredmoo - please review too... |
jaredmoo
left a comment
There was a problem hiding this comment.
Overall looking pretty good :)
| /// Gets or sets the recurring scans settings | ||
| /// </summary> | ||
| [JsonProperty(PropertyName = "properties.recurringScans")] | ||
| public VulnerabilityAssessmentRecurringScansProperties RecurringScans { get; set; } |
There was a problem hiding this comment.
Do you not want to flatten these properties up into this class? Either way is fine, but I want to check it is a conscious decision :)
There was a problem hiding this comment.
It is a conscious decision.
I'll flatten these properties up in powershell
| /// parameter. | ||
| /// </summary> | ||
| [JsonProperty(PropertyName = "properties.storageContainerSasKey")] | ||
| public string StorageContainerSasKey { get; set; } |
There was a problem hiding this comment.
Are any of these properties required?
|
|
||
| sqlClient.DatabaseVulnerabilityAssessmentRuleBaselines.CreateOrUpdate(resourceGroup.Name, server.Name, dbName, testRuleId, ruleBaselineToSet); | ||
|
|
||
| // Get basleine |
There was a problem hiding this comment.
Same typo is copied a few times elsewhere
| string scanId1 = string.Format("scantest2_{0}", DateTime.UtcNow.Ticks); | ||
| sqlClient.DatabaseVulnerabilityAssessmentScans.Execute(resourceGroup.Name, server.Name, dbName, scanId1); | ||
|
|
||
| // Veroify get scan and list scans |
| await SetPolicy(context, sqlClient, resourceGroup, server, dbName); | ||
|
|
||
| // Run some scans | ||
| string scanId = string.Format("scantest1_{0}", DateTime.UtcNow.Ticks); |
There was a problem hiding this comment.
How is this going to work with test playback? UtcNow is different every time you run the test, so the scan uri is not reproducable
|
|
||
| // Run some scans | ||
| string scanId = string.Format("scantest1_{0}", DateTime.UtcNow.Ticks); | ||
| sqlClient.DatabaseVulnerabilityAssessmentScans.Execute(resourceGroup.Name, server.Name, dbName, scanId); |
There was a problem hiding this comment.
Wasn't this changed to InitiateScan?
There was a problem hiding this comment.
yep, it was.
will change the client code and update the swagger in azure-rest-api-specs repo
|
@yaakoviyun Please fix failing test cases |
dsgouda
left a comment
There was a problem hiding this comment.
These look like additive changes. Please bump the minor version in csproj file along with PackageReleaseNotes
Added needed changes to Swagger and exampels Added needed changes to Swagger Azure/azure-sdk-for-net#4327 (review)
Added needed changes to Swagger and exampels Added needed changes to Swagger Azure/azure-sdk-for-net#4327 (review)
Added needed changes to Swagger and exampels Added needed changes to Swagger Azure/azure-sdk-for-net#4327 (review)
Added needed changes to Swagger and exampels Added needed changes to Swagger Azure/azure-sdk-for-net#4327 (review)
Turn ON database threat detection as a preprequite to use VA
|
@dsgouda - Jenkins build failure below seems like not our fault |
|
@dsgouda , can you merge? |
|
This PR was merged into #4351 and can be closed, |
* Adding Vulnerability Assessment APIs on managed instance Adding Vulnerability Assessment APIs on managed instance * fixed scan operation id * character mismatch fix * Added needed changes to Swagger and exampels Added needed changes to Swagger Azure/azure-sdk-for-net#4327 (review) * Delete managedDatabaseVulnerabilityAssessmentBaselines.json * Delete managedDatabaseVulnerabilityAssessmentScans.json * Delete managedDatabaseVulnerabilityAssessments.json * Delete ManagedDatabaseVulnerabilityAssessmentCreateMax.json * Delete ManagedDatabaseVulnerabilityAssessmentCreateMin.json * Delete ManagedDatabaseVulnerabilityAssessmentDelete.json * Delete ManagedDatabaseVulnerabilityAssessmentGet.json * Delete ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json * Delete ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json * Delete ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json * Delete ManagedDatabaseVulnerabilityAssessmentScanExport.json * Delete ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json * Delete ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json * Delete ManagedDatabaseVulnerabilityAssessmentScansExecute.json * Update readme.md
Added needed changes to Swagger and exampels Added needed changes to Swagger Azure/azure-sdk-for-net#4327 (review)
Added needed changes to Swagger and exampels Added needed changes to Swagger Azure/azure-sdk-for-net#4327 (review)
Adding vulnerability Assessemtn clinet code